package model.entities;

import java.io.Serializable;
import java.util.Date;



public class CartaoFuncionarioId implements Serializable{

	/**
	 * 
	 */
	private static final long serialVersionUID = 6289991557853905902L;
    /** full constructor */
	private String matricula;
	private Date dataCadastro;
	private long cartaoAcesso;
	
	public CartaoFuncionarioId(){
		
	}
    public CartaoFuncionarioId(String matricula, Date dataCadastro,int cartaoAcesso) {
        this.matricula = matricula;
        this.dataCadastro = dataCadastro;
        this.cartaoAcesso = cartaoAcesso;
    }
    public boolean equals(Object other) {
        if ( (this == other ) ) return true;
		 if ( (other == null ) ) return false;
		 if ( !(other instanceof CartaoFuncionarioId) ) return false;
		 CartaoFuncionarioId castOther = ( CartaoFuncionarioId ) other; 
        
		 return (this.getCartaoAcesso()==castOther.getCartaoAcesso())
&& ( (this.getDataCadastro()==castOther.getDataCadastro()) || ( this.getDataCadastro()!=null && castOther.getDataCadastro()!=null && this.getDataCadastro().equals(castOther.getDataCadastro()) ) )
&& ( (this.getMatricula()==castOther.getMatricula()) || ( this.getMatricula()!=null && castOther.getMatricula()!=null && this.getMatricula().equals(castOther.getMatricula()) ) );
  }
  /*
  public int hashCode() {
        int result = 17;
        
        result = 37 * result + this.getCartaoAcesso();
        result = 37 * result + ( getDataCadastro() == null ? 0 : this.getDataCadastro().hashCode() );
        result = 37 * result + ( getMatricula() == null ? 0 : this.getMatricula().hashCode() );
        return result;
  }*/
/**
 * @return Returns the cartaoAcesso.
 */
public long getCartaoAcesso() {
	return cartaoAcesso;
}
/**
 * @param cartaoAcesso The cartaoAcesso to set.
 */
public void setCartaoAcesso(long cartaoAcesso) {
	this.cartaoAcesso = cartaoAcesso;
}
/**
 * @return Returns the dataCadastro.
 */
public Date getDataCadastro() {
	return dataCadastro;
}
/**
 * @param dataCadastro The dataCadastro to set.
 */
public void setDataCadastro(Date dataCadastro) {
	this.dataCadastro = dataCadastro;
}
/**
 * @return Returns the matricula.
 */
public String getMatricula() {
	return matricula;
}
/**
 * @param matricula The matricula to set.
 */
public void setMatricula(String matricula) {
	this.matricula = matricula;
}   


}
